#ifndef __PKMNONLINE_CLIENT_H__
#define __PKMNONLINE_CLIENT_H__
#include <stdio.h>
#ifndef WIN32_LEAN_AND_MEAN
#	define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#include <winsock2.h>
#include "clientinfo.h"
#include "packet.h"

/* Client Message ID's. */
enum {
	PMC_IDENTIFY	= 0x0001,
	PMC_LOGIN		= 0x0002,
	PMC_MOVE		= 0x0003
};

/* Server Message ID's. */
enum {
	PMS_DISCONNECT	= 0x0001,
	PMS_CHANGELEVEL = 0x0002,
	PMS_ADDACTOR	= 0x0003,
	PMS_DELETEACTOR = 0x0004,
	PMS_UPDATEACTOR = 0x0005,
	PMS_UPDATEPOS   = 0x0006
};

class CClient {
public:
	CClient(CLIENTINFO *pInfo);

	void Update();
	void Send(u_short nMsg, CPacket *pPacket);

private:
	void Handle(CPacket *pPacket);

	/* Message Handlers. */
	bool MSG_Identify(CPacket* packet);
	bool MSG_Login(CPacket *packet);
	bool MSG_Move(CPacket *packet);

	CLIENTINFO *m_pInfo;
};

#endif /* __PKMNONLINE_CLIENT_H__ */
